<div ng-controller="createDeploy" class="clearfix script-content">
    <div class="wrapper-md">
        <div class="panel panel1 panel-default" ng-show="!showDetail">
            <div style="min-height: 600px;overflow: hidden;">
                <div class="col-sm-3">
                    <img src="/statics/img/img_first.png" ng-show="imgFirst">
                    <img src="/statics/img/img_second.png" ng-show="imgSecond">
                    <img src="/statics/img/img_third.png" ng-show="imgThird">
                    <img src="/statics/img/shop_first.png" ng-show="shopFirst">
                    <img src="/statics/img/shop_second.png" ng-show="shopSecond">
                    <img src="/statics/img/shop_third.png" ng-show="shopThird">
                    <img src="/statics/img/bian_first.png" ng-show="bianFirst">
                    <img src="/statics/img/bian_second.png" ng-show="bianSecond">
                </div>
                <div class="col-sm-9 instrument-dp" style="margin-top:20px;" ng-show="firstStep">
                    <div class="col-sm-3 deploy-first-top" ng-class="{'colorBlue': firstBule,'colorGrey': firstGrey}" style="margin-right:20px; cursor: pointer;" ng-click="choseFirst()">
                        <div class="col-sm-12 deploy-first-img">
                            <img src="/statics/img/img_in.png" style="width: 90px;height: 90px;">
                        </div>
                        <div class="col-sm-12 deploy-first-font">
                            <span class="develop-re" style="font-size: 14px;">镜像仓库</span>
                        </div>
                        <div class="col-sm-12 deploy-first-font">
                            <span class="app-view">通过镜像仓库创建应用</span>
                        </div>
                    </div>
                    <!--<div class="col-sm-3 deploy-first-top" ng-class="{'colorBlue': secondBule,'colorGrey': secondGrey}"style="margin-right:20px;cursor: pointer;" ng-click="choseSecond()">
                        <div class="col-sm-12 deploy-first-img">
                            <img src="/statics/img/img_in.png" style="width: 90px;height: 90px;">
                        </div>
                        <div class="col-sm-12 deploy-first-font">
                            <span class="develop-re" style="font-size: 14px;">应用商店</span>
                        </div>
                        <div class="col-sm-12 deploy-first-font">
                            <span class="app-view">通过应用商店创建应用</span>
                        </div>
                    </div>
                    <div class="col-sm-3 deploy-first-top" ng-class="{'colorBlue': thirdBule,'colorGrey': thirdGrey}" style="margin-right:20px;cursor: pointer;" ng-click="choseThird()">
                        <div class="col-sm-12 deploy-first-img">
                            <img src="/statics/img/img_in.png" style="width: 90px;height: 90px;">
                        </div>
                        <div class="col-sm-12 deploy-first-font">
                            <span class="develop-re" style="font-size: 14px;">编排文件</span>
                        </div>
                        <div class="col-sm-12 deploy-first-font">
                            <span class="app-view">通过编排文件创建应用</span>
                        </div>
                    </div>-->
                    <div class="col-sm-12" style="margin-top: 30px;">
                        <div class="col-sm-12">
                            <button class="btn m-b-xs w-xs btn-primary" ng-click="next()" style="float: right">下一步</button>
                            <button class="btn m-b-xs w-xs btn-default" ng-click="cancel()" style="float: right;margin-right: 30px;">取消</button>
                        </div>
                    </div>
                </div>
                <div class="col-sm-9 instrument-dp" ng-show="SecondStep_img">
                    <div class="col-sm-12" style="margin-top: 30px;">
                            <div class="search-content">
                                <div class="form-group">
                                    <label class="control-label">镜像名称：</label>
                                    <input type="username" ng-model="searchByHostname" class="form-control input-sm" placeholder="" aria-controls="DataTables_Table_3">
                                </div>
                                <button class="btn btn-info w-xs m-r" ng-click="getData(1)"><i class="fa fa-search"></i> 查询</button>
                            </div>
                        <div class="table-responsive">
                            <table class="table b-light m-b-xxs">
                                <thead class="table-header" >
                                <tr>
                                    <th width="5%" class="font-15 text-center">
                                        <!--<label class="i-checks m-b-none"><input type="checkbox" ng-model="operation.selectAll1" ng-click="chooseAll1()"><i></i></label>-->
                                    </th>
                                    <th width="35%" class="font-15 text-center">镜像UID</th>
                                    <!--<th width="15%" class="font-15 text-center">镜像状态</th>-->
                                    <th width="35%" class="font-15 text-center">镜像名称</th>
                                    <th width="10%" class="font-15 text-center">镜像标签</th>
                                    <!--<th width="15%" class="font-15 text-center">所属应用</th>-->
                                    <th width="15%" class="font-15 text-center">创建时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr ng-repeat="row in imgList" ng-if="!isImageData">
                                    <td width="5%" class="font-15 text-center">
                                        <label class="i-checks m-b-none"><input type="radio" name = "imgType" ng-checked="imgList[0].imageId==row.imageId" ng-click="choose(row)"><i></i></label>
                                    </td>
                                    <td width="35%" class="font-15 text-center text-overflow" style="max-width:162px;"  ng-bind="row.imageUuid"></td>
                                    <!--<td width="15%" class="font-15 text-center text-overflow" style="max-width:108px;" ng-bind="row.imageScanStatus"></td>-->
                                    <td width="35%" class="font-15 text-center text-overflow" style="max-width:214px;" ng-bind="row.imageName"></td>
                                    <td width="10%" class="font-15 text-center text-overflow" style="max-width:214px;" ng-bind="row.imageTag"></td>
                                    <!--<td width="15%" class="font-15 text-center text-overflow" style="max-width:161px;" ng-bind="row.name" ></td>-->
                                    <td width="15%" class="font-15 text-center text-overflow" style="max-width:161px;" ng-bind="row.imageCreatetime | date:'yyyy-MM-dd HH:mm:ss'"></td>
                                </tr>
                                <tr ng-if="isImageData">
                                    <td class="td-nodata" colspan="6">暂无数据</td>
                                </tr>
                                </tbody>
                            </table>
                            <div class="clearfix">
                                <div class="col-sm-6">
                                    <div class="paginationTables_info">共有<span ng-bind="totalCount"></span>条记录，每页显示<span
                                            ng-bind="param.rows"></span>条
                                    </div>
                                </div>
                                <div class="col-sm-6 text-right">
                                    <pagination boundary-links="true" total-items="totalCount" items-per-page="param.rows" max-size="10"
                                                ng-model="param.page" ng-change="getData(param.page)" previous-text="&lsaquo;"
                                                next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></pagination>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12">
                            <button class="btn m-b-xs w-xs btn-primary" ng-click="next_img_second()" style="float: right">下一步</button>
                            <button class="btn m-b-xs w-xs btn-default" ng-click="previous_img_second()" style="float: right;margin-right: 30px;">上一步</button>
                        </div>
                    </div>
                </div>
                <div class="col-sm-9 instrument-dp" ng-show="ThirdStep_img">
                    <form class="form-horizontal form-validation" name="addFirstForm">
                        <!--<div class="ren_top_div">
                            <span class="ren_top_font">应用通常会依赖MySQL，请先确认已选择模块</span>
                        </div>-->
                        <div class="form-group">
                            <div class="col-lg-12">
                                <label class="col-lg-2 control-label">应用名：</label>
                                <div class="col-lg-10 control-input">
                                    <input type="text" class="form-control" ng-model="img.appName" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                                </div>
                            </div>
                        </div>
                        <!--<div class="form-group">
                            <div class="col-lg-12">
                                <label class="col-lg-2 control-label">环境：</label>
                                <div class="col-lg-10 control-input">
                                    <select class="form-control" ng-model="addData.hostType">
                                        <option value="">&#45;&#45;请选择&#45;&#45;</option>
                                    </select>
                                </div>
                            </div>
                        </div>-->
                        <div class="form-group">
                            <div class="col-lg-12">
                                <label class="col-lg-2 control-label">发布实例：</label>
                                <div class="col-lg-10 control-input">
                                    <input type="text" name="hostname" class="form-control" ng-model="img.instanceReplica" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                                </div>
                            </div>
                        </div>
                    </form>
                    <div class="form-group">
                        <div class="col-lg-12">
                            <label class="col-lg-2 control-label">高级选项：</label>
                            <div style="padding: 6px;">
                                <img src="/statics/img/double_down.png" ng-click="showGao($event)">
                                <img src="/statics/img/double_up.png" style="display: none;" ng-click="hideGao($event)">
                            </div>
                        </div>
                    </div>
                    <div style="display: none;">
                        <tabset class="tab-container">
                            <tab heading="环境变量">
                                <div class="col-sm-12" style="min-height: 123px;margin-bottom: 15px;">
                                    <div class="col-sm-12 app-env-border">
                                        <p class="app-env-h">添加变量</p>
                                        <form class="form-horizontal form-validation" style="display: inline;" name="addEnvForm">
                                            <div class="app-env-i" style="width:36%;">
                                                <input type="text" ng-model="env.key" class="form-control no-border"  placeholder="key" required>
                                            </div>
                                            <div class="app-env-i" style="width:36%;">
                                                <input type="text" ng-model="env.value" class="form-control no-border" placeholder="value" required>
                                            </div>
                                        </form>
                                        <button class="btn btn-primary w-xs m-r" validation-submit="addEnvForm" ng-disabled="addEnvForm.$invalid" ng-click="addEnv()" style="float: right;"><i class="fa fa-plus-circle"></i>创建</button>
                                    </div>
                                </div>
                                <div class="">
                                    <div class="dataTables_wrapper form-inline">
                                        <div class="row">
                                            <div class="col-sm-12">
                                                <div class="col-sm-12" style="max-height: 300px;overflow: auto;">
                                                    <div class="col-sm-12 app-env-list">
                                                        <p class="app-env-h" style="margin-top: 20px;">管理变量</p>
                                                        <table class="table table-striped b-light m-b-xxs">
                                                            <thead class="table-header">
                                                            <tr>
                                                                <th width="40%" class="font-15 ">Key</th>
                                                                <th width="40%" class="font-15 ">Value</th>
                                                                <th class=" td-operate font-15 text-center" width="20%">操作</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            <tr class="table-content" ng-repeat="row in rowEnvList">
                                                                <td width="40%" class="font-15 " title="{{row.key}}" ng-bind="row.key"></td>
                                                                <td width="40%" class="font-15 " title="{{row.value}}" ng-bind="row.value"></td>
                                                                <td width="20%" class="td-operate text-center">
                                                                    <button class="btn btn-danger btn-sm" ng-click="removeEnv(row)">
                                                                        <i class="fa fa-trash-o"></i>
                                                                        <span class="">删除</span>
                                                                    </button>
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </tab>
                            <tab heading="硬盘卷">
                                <div class="col-sm-12" style="min-height: 123px;margin-bottom: 15px;">
                                    <div class="col-sm-12 app-env-border">
                                        <p class="app-env-h">添加卷</p>
                                        <form class="form-horizontal form-validation" style="display: inline;" name="addDiskForm">
                                            <div class="app-env-i">
                                                <input type="text" value="local" class="form-control no-border " readonly>
                                            </div>
                                            <div class="app-env-i">
                                                <input type="text" ng-model="disk.path" class="form-control no-border" placeholder="path"  required>
                                            </div>
                                        </form>
                                        <button class="btn btn-primary w-xs m-r" validation-submit="addDiskForm" ng-disabled="addDiskForm.$invalid" ng-click="addDisk()"><i class="fa fa-plus-circle"></i>创建</button>
                                    </div>
                                </div>
                                <div class="">
                                    <div class="dataTables_wrapper form-inline">
                                        <div class="row">
                                            <div class="col-sm-12">
                                                <div class="col-sm-12" style="max-height: 300px;overflow: auto;">
                                                    <div class="col-sm-12 app-env-list">
                                                        <p class="app-env-h" style="margin-top: 20px;">管理卷</p>
                                                        <table class="table table-striped b-light m-b-xxs">
                                                            <thead class="table-header">
                                                            <tr>
                                                                <th width="30%" class="font-15 ">Type</th>
                                                                <th width="30%" class="font-15 ">Path</th>
                                                                <th class=" td-operate font-15 text-center" width="10%">操作</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            <tr class="table-content" ng-repeat="row in rowDiskList">
                                                                <td width="30%" class="font-15 ">local</td>
                                                                <td width="30%" class="font-15 " title="{{row.configVolumesPath}}" ng-bind="row.configVolumesPath"></td>
                                                                <td width="10%" class="td-operate text-center">
                                                                    <button class="btn btn-danger btn-sm" ng-click="removeDisk(row)">
                                                                        <i class="fa fa-trash-o"></i>
                                                                        <span class="">删除</span>
                                                                    </button>
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </tab>
                            <tab heading="端口">
                                <div class="col-sm-12" style="min-height: 123px;margin-bottom: 15px;">
                                    <div class="col-sm-12 app-env-border">
                                        <p class="app-env-h">添加端口</p>
                                        <form class="form-horizontal form-validation" style="display: inline;" name="addPortForm">
                                            <div class="app-env-i" style="width:72%;">
                                                <input type="text" ng-model="port.value" class="form-control no-border" value="8080"  required>
                                            </div>
                                        </form>
                                        <button class="btn btn-primary w-xs m-r" validation-submit="addPortForm" ng-disabled="addPortForm.$invalid" ng-click="addPort()" style="float: right;"><i class="fa fa-plus-circle"></i>创建</button>
                                    </div>
                                </div>
                                <div class="">
                                    <div class="dataTables_wrapper form-inline">
                                        <div class="row">
                                            <div class="col-sm-12">
                                                <div class="col-sm-12" style="max-height: 300px;overflow: auto;">
                                                    <div class="col-sm-12 app-env-list">
                                                        <p class="app-env-h" style="margin-top: 20px;">管理端口</p>
                                                        <table class="table table-striped b-light m-b-xxs">
                                                            <thead class="table-header">
                                                            <tr>
                                                                <th width="60%" class="font-15 ">Value</th>
                                                                <th class=" td-operate font-15 text-center" width="40%">操作</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            <tr class="table-content" ng-repeat="row in rowPortList">
                                                                <td width="60%" class="font-15 " title="{{row.value}}" ng-bind="row.value"></td>
                                                                <td width="40%" class="td-operate text-center">
                                                                    <button class="btn btn-danger btn-sm" ng-click="removePort(row)">
                                                                        <i class="fa fa-trash-o"></i>
                                                                        <span class="">删除</span>
                                                                    </button>
                                                                </td>
                                                            </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </tab>
                            <tab heading="资源配置">
                                <form class="form-horizontal form-validation" name="addShenForm">
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 120px;">cpu</label>
                                        <input type="text" class="form-control shen_font" ng-model="img.cpu">
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 120px;">内存</label>
                                        <input type="text" class="form-control shen_font" ng-model="img.mem">Mi
                                    </div>
                                </form>
                            </tab>
                            <!--<tab heading="弹性伸缩">
                                <form class="form-horizontal form-validation" name="addShenForm">
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">策略名称</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">最大节点</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">最小节点</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">集群资源占比</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">CPU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;扩展阈值</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">%
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">内存&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;扩展阈值</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">MB
                                    </div>
                                    <div style="margin-top: 20px;">
                                        <label class="col-lg-2 control-label" style="width: 130px;">网络&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;扩展阈值</label>
                                        <input type="text" class="form-control shen_font" placeholder="" name="">KM/S
                                    </div>
                                </form>
                            </tab>-->
                        </tabset>
                    </div>
                    <div class="col-sm-12">
                        <button class="btn m-b-xs w-xs btn-primary" validation-submit="addFirstForm" ng-disabled="addFirstForm.$invalid" ng-click="create_img()" style="float: right">创建</button>
                        <button class="btn m-b-xs w-xs btn-default" ng-click="previous_img_third()" style="float: right;margin-right: 30px;">上一步</button>
                    </div>
                </div>
                <div class="col-sm-9 instrument-dp" ng-show="SecondStep_shop">
                    <div class="col-sm-12" style="margin-top: 30px;">
                        <div class="search-box m-b-md">
                            <div class="legend">查询条件</div>
                            <div class="search-content">
                                <div class="form-group">
                                    <label class="control-label">主机名：</label>
                                    <input type="username" ng-model="searchByHostname" class="form-control input-sm" placeholder="" aria-controls="DataTables_Table_3">
                                </div>
                            </div>
                            <div class="search-btn">
                                <button class="btn btn-info w-xs m-r" ng-click="getData(1)"><i class="fa fa-search"></i> 查询</button>
                            </div>
                        </div>
                        <ul class="list-unstyled" >
                            <li class="list-li" ng-repeat="row in shopServerList">
                                <div class="col-md-2">
                                    <div class="col-md-12 instrument-dp shop_img_div" ng-class="{true:'shop_img_blue'}[row.selected]" ng-click="chose_shop_img(row)">
                                        <img src="/statics/img/a0.jpg" style="width:70px;height: 70px;">
                                    </div>
                                    <div class="col-md-12 instrument-dp shop_div_font">
                                        <span>数据库</span>
                                    </div>
                                </div>
                            </li>
                        </ul>
                        <div class="col-sm-12">
                            <button class="btn m-b-xs w-xs btn-primary" ng-click="next_shop_second()" style="float: right">下一步</button>
                            <button class="btn m-b-xs w-xs btn-default" ng-click="previous_shop_second()" style="float: right;margin-right: 30px;">上一步</button>
                        </div>
                    </div>
                </div>
                <div class="col-sm-9 instrument-dp" ng-show="thirdStep_shop">
                    <div class="col-sm-12" style="margin-top: 30px;">
                        <div class="col-sm-12" style="margin-top: 30px;">
                            <div class="form-group">
                                <div class="col-lg-12" style="margin-bottom: 20px;">
                                    <label class="col-lg-2 control-label">应用名称：</label>
                                    <div class="col-lg-10 control-input">
                                        <input type="text" name="username" class="form-control" ng-model="addData.username" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-12" style="margin-bottom: 20px;">
                                    <label class="col-lg-2 control-label">应用描述：</label>
                                    <div class="col-lg-10 control-input">
                                        <input type="text" name="username" class="form-control" ng-model="addData.username" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-12" style="margin-bottom: 20px;">
                                    <label class="col-lg-2 control-label">编排内容：</label>
                                    <div ng-code-mirror2="" code-mirror="codeMirror">
                                        <div class="form-group" style="height: 300px">
                                            <textarea class="textarea"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-12">
                                <button class="btn m-b-xs w-xs btn-primary" ng-click="create_shop()" style="float: right">创建</button>
                                <button class="btn m-b-xs w-xs btn-default" ng-click="previous_shop_third()" style="float: right;margin-right: 30px;">上一步</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-9 instrument-dp" ng-show="SecondStep_choreography">
                    <div class="col-sm-12" style="margin-top: 30px;">
                        <div class="form-group">
                            <div class="col-lg-12" style="margin-bottom: 20px;">
                                <label class="col-lg-2 control-label">应用名称：</label>
                                <div class="col-lg-10 control-input">
                                    <input type="text" name="username" class="form-control" ng-model="addData.username" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-12" style="margin-bottom: 20px;">
                                <label class="col-lg-2 control-label">应用描述：</label>
                                <div class="col-lg-10 control-input">
                                    <input type="text" name="username" class="form-control" ng-model="addData.username" validator="required" maxlength="64" maxlength-error-message="最多输入64个字符">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-12" style="margin-bottom: 20px;">
                                <label class="col-lg-2 control-label">编排文件：</label>
                                <div class="col-lg-10 control-input">
                                    <input type="file" id="upload_file" class="file"/>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-lg-12" style="margin-bottom: 20px;">
                                <label class="col-lg-2 control-label">编排内容：</label>
                                <div ng-code-mirror="" code-mirror="codeMirror">
                                    <div class="form-group" style="height: 300px">
                                        <textarea class="textarea"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-12">
                            <button class="btn m-b-xs w-xs btn-primary" ng-click="create_choreography()" style="float: right">创建</button>
                            <button class="btn m-b-xs w-xs btn-default" ng-click="previous_choreography_second()" style="float: right;margin-right: 30px;">上一步</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>